package Fly;

import java.util.Random;

public class Client {
    public static void main(String[] args) {
        PieceFactory pieceFactory = new PieceFactory();
        Random random = new Random();

        // 棋子种类
        String[] kinds = {"白棋", "黑棋"};

        for (int i = 0; i < 10; i++) { // 放置10次
            // 随机选择棋子
            String selectedKind = kinds[random.nextInt(kinds.length)];

            // 随机生成坐标
            int x = random.nextInt(15); // 假设棋盘大小为15x15
            int y = random.nextInt(15);

            // 获取棋子并落子
            APiece piece = pieceFactory.GetPiece(selectedKind);
            piece.play(x, y);
        }

        System.out.println("总共使用的棋子种类数: " + pieceFactory.GetPieceCount());
    }
}